package com.salton123.dytt;

import com.salton123.dytt.entity.MovieListInfo;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface ApiService {
    //获取电影列表
    //https://www.dytt8.net/html/gndy/dyzz/list_23_2.html
    @GET("/dyzz/list_{type}_{page}.html")
    @Headers("User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.13 Safari/537.36)")
    Observable<String> moveList(
            @Query("type") int type,
            @Path("page") int page);

    //获取电影详情
    //http://m.dydytt.net:8080/adminapi/api/movieDetail.json?categoryId=9&movieDetailId=25226
    @GET("/adminapi/api/movieDetail.json")
    Observable<MovieListInfo> movieDetail(
            @Query("categoryId") int categoryId,
            @Query("movieDetailId") int movieDetailId);


}